import request from "../../utils/request.js";
//自动化管理
//仪表盘
//主机可用数量
export const getDashboardAvailable_Api = () => {
  return request({
    method: "get", //请求方式
    url: "/dashboard/available", //请求地址
  });
};
//检索问题分类数量
export const getAvailableProblemNumber_Api = () => {
  return request({
    method: "get", //请求方式
    url: "/dashboard/problemNumber", //请求地址
  });
};
//统计检测主机数量
export const getAvailableEnableHost_Api = () => {
  return request({
    method: "get", //请求方式
    url: "/dashboard/enableHost", //请求地址
  });
};
//获取监控数量
export const getItemNum_Api = () => {
  return request({
    method: "get", //请求方式
    url: "/dashboard/itemNum", //请求地址
  });
};
//获取触发器数量
export const getTriggerNumber_Api = () => {
  return request({
    method: "get", //请求方式
    url: "/dashboard/triggerNumber", //请求地址
  });
};
//获取服务是否启动
export const getIsOpen_Api = () => {
  return request({
    method: "get", //请求方式
    url: "/automated/detection/isOpen", //请求地址
  });
};
//获取ip
export const getIP_Api = () => {
  return request({
    method: "get", //请求方式
    url: "/automated/detection/getIP", //请求地址
  });
};
//查询图像
//获取主机图像信息
export const getGraphsApi = (id) => {
  return request({
    method: "get", //请求方式
    url: "/graphs/" + id, //请求地址
  });
};
//根据图表ID数据
export const getGraphsIconApi = (query) => {
  return request({
    method: "get", //请求方式
    url: "/graphs/icon",
    params: query, //请求地址
  });
};
//根据图像ID获取触发器
export const getGraphsTriggersApi = (id) => {
  return request({
    method: "get", //请求方式
    url: "/graphs/icon/triggers/" + id, //请求地址
  });
};
//配置变更
//配置变更列表
export const getConfigchangeListApi = (query) => {
  return request({
    method: "get", //请求方式
    url: "/automated/configchange/list",
    params: query, //请求地址
  });
};
//配置还原
export const getRestoreConfigApi = (id) => {
  return request({
    method: "post", //请求方式
    url: "/automated/configchange/restoreConfig/" + id,
  });
};
//配置检查
//配置检查列表
export const getConfigcheckListApi = (query) => {
  return request({
    method: "get", //请求方式
    url: "/automated/configcheck/list",
    params: query, //请求地址
  });
};
//配置检查弹窗列表
export const getOneConfigListApi = (id, query) => {
  return request({
    method: "get", //请求方式
    url: "/automated/configbackup/oneConfigPageList/" + id,
    params: query,
    //请求地址
  });
};

//文件对比
export const getCompareFileApi = (id1, id2) => {
  return request({
    method: "post", //请求方式
    url: "/automated/configcheck/compareFile/" + id1 + "/" + id2,
  });
};
//文件对比提交
export const getCompareFileSubmitApi = (data) => {
  return request({
    method: "post", //请求方式
    url: "/automated/configcheck/compareFileSubmit",
    data,
  });
};
//配置备份
//配置备份列表
export const getConfigbackupListApi = (query) => {
  return request({
    method: "get", //请求方式
    url: "/automated/configbackup/list",
    params: query,
    //请求地址
  });
};
//新建配置备份
export const getAddConfigbackupApi = (data) => {
  return request({
    method: "post", //请求方式
    url: "/automated/configbackup",
    data,
    //请求地址
  });
};
//修改配置备份
export const getEditConfigbackupApi = (data) => {
  return request({
    method: "put", //请求方式
    url: "/automated/configbackup",
    data,
    //请求地址
  });
};
//删除配置备份
export const getDelConfigbackupApi = (id) => {
  return request({
    method: "delete", //请求方式
    url: "/automated/configbackup/" + id,
    //请求地址
  });
};

//备份历史列表
export const getConfigbackupApi = (id, query) => {
  return request({
    method: "get", //请求方式
    url: "/automated/configbackup/oneConfigPageList/" + id,
    params: query,
    //请求地址
  });
};
//配置更新提交
export const getChangeConfigApi = (id) => {
  return request({
    method: "post", //请求方式
    url: "/automated/configbackup/changeConfig/" + id,
    //请求地址
  });
};
//获取主机列表//巡检报告概述信息
export const getRemoteHostListApi = (id) => {
  return request({
    method: "get", //请求方式
    url: "/intelligent/healthCheck/" + id,
    //请求地址
  });
};

//主机指标//获取主机列表
export const getHostIndicatorApi = (query) => {
  return request({
    method: "get", //请求方式
    url: "/dataPresentation/list",
    params: query,
    //请求地址
  });
};
//查询主机账号信息
export const getHostAccountApi = (id) => {
  return request({
    method: "get", //请求方式
    url: "/automated/hostAccount/" + id,
    //请求地址
  });
};
//查询主机账号信息
export const getAddHostAccountApi = (data) => {
  return request({
    method: "post", //请求方式
    url: "/automated/hostAccount",
    data,
    //请求地址
  });
};
//查询操作审计数据
export const getAuditApi = (query) => {
  return request({
    method: "get", //请求方式
    url: "/monitor/operaudit/list",
    params: query,
    //请求地址
  });
};

//查询合规审计数据
export const getComplianceApi = (query) => {
  return request({
    method: "get", //请求方式
    url: "/monitor/operaudit/list",
    params: query,
    //请求地址
  });
};
//操作系统安装
export const systemInstall = (data) => {
  return request({
    method: "post", //请求方式
    url: "/monitor/operaudit/systemInstall",
    data,
    //请求地址
  });
};
